﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using TSites.Core.Repository;
using Spring.Stereotype;
using TSites.Core.Domain.MenuMgmt;
using NHibernate.Criterion;
using NHibernate;

namespace TSites.Data.MenuMgmt
{
    [Repository]
    public class MenuDao:NHibernateRepository<Menu, int>, IMenuDao
    {
        public IList<Menu> GetListMenu()
        {
            ICriteria crit = CurrentSession.CreateCriteria(typeof(Menu));
            return GetList(crit,true,"ParentMenuId");
        }
    }
}
